package cn.net.cfss.fgbp.api.console.inte;

import cn.net.cfss.fgbp.api.console.constant.Constants;
import cn.net.cfss.fgbp.api.console.vo.SysRoleAppVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author oygq
 * @title: IRoleAppService
 * @description: 角色应用接口类
 * @date 2019/4/3 11:18
 */
@FeignClient(name = Constants.SPI_SERVER_NAME)
@RequestMapping("roleApp")
public interface ISysRoleAppService {

    @RequestMapping(value = "/add" ,method = RequestMethod.POST,produces="application/json;charset=UTF-8")
    public boolean insert(@RequestBody SysRoleAppVo vo);

    @RequestMapping(value = "/edit" ,method = RequestMethod.POST,produces="application/json;charset=UTF-8")
    public boolean update(@RequestBody SysRoleAppVo vo);

    @RequestMapping(value = "/delete/{roleAppId}" ,method = RequestMethod.POST,produces="application/json;charset=UTF-8")
    public boolean delete(@PathVariable(value = "roleAppId") Long roleAppId);

    @RequestMapping(value = "/deleteBatch" ,method = RequestMethod.POST,produces="application/json;charset=UTF-8")
    public boolean deleteBatch(@RequestBody Long[] roleAppIds);

    @RequestMapping(value = "/query/{roleId}" ,method = RequestMethod.POST,produces="application/json;charset=UTF-8")
    public List<Long> queryByAppId(@PathVariable(value = "roleId") Long roleId);

}
